Skip to content

Conversation

jbrockmendel
Copy link
Member

This sits on top of #33441

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks generally good

if isinstance(other, _Timedelta):
ots = other
elif PyDelta_Check(other) or isinstance(other, Tick):
elif (is_timedelta64_object(other) or PyDelta_Check(other)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any performance implications of checking this first now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when we have a timedelta64 object we're avoiding a few unnecessary checks below (L784 of which occurs in python-space). otherwise we are delaying everything by the duration of a is_timedelta64_object call, which is small

@WillAyd WillAyd added the Timedelta Timedelta data type label Apr 10, 2020
@jreback jreback added this to the 1.1 milestone Apr 10, 2020
@jreback jreback added the Clean label Apr 10, 2020
@jreback
Copy link
Contributor

jreback commented Apr 10, 2020

can you rebase so easier to see the diff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Clean Timedelta Timedelta data type

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants